<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>MagicDTree&nbsp;Document</title>
<title>JQuery MagicGrid Document</title>
<meta name="description" content="JQuery Dynatree Wrapper - MagicDTree Document" />
<meta name="keywords" content="JQuery Dynatree Wrapper MagicDTree Plugin Document" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="google-site-verification" content="yaeorbXgKPwp5BDegBtAJEHYWFEFE-BViWTj74gJPrw" />
<!--  -->
<link href="/css/default.css" type="text/css" rel="stylesheet" />
<!--  -->
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/lang/en.js"></script>
<script type="text/javascript" src="/js/mac/core.js"></script><link href="/javascript/tabs/css/default.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/js/mac/tabs.js"></script>
<script type="text/javascript">
$(function(){
	$('#docTabs').mac('tabs',{
		items: [{
			code: 'overview',
			title: 'Overview',
			height: 'auto',
			el: $('#overview')
		},{
			code: 'options',
			title: 'Options',
			height: 'auto',
			el: $('#options')
		},{
			code: 'events',
			title: 'Events',
			height: 'auto',
			el: $('#events')
		},{
			code: 'methods',
			title: 'Methods',
			height: 'auto',
			el: $('#methods')
		}]
	}).selectFirst();
});
</script>
</head>
<body>
<style stype="text/css">
#head { height: 60px; background-color: #333; }
#head img { float: left; border: none; }
#head .right { float: right; height: 60px; color: #FFF; text-align: right; }
#head .right a { color: #CCC; font-size: 16px; color: #FFF; }
#head .title {
	color: #F93; float: left; height: 60px; line-height: 60px;
	font-size: 40px; font-family: Impact, 'Comic Sans MS';
}
#head a { color: #F93; text-decoration: underline; }
.hr { height: 12px; background: transparent url(/css/images/nm-b.png) repeat-x; }
</style>
<script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/openapi/qc_loader.js"
	data-appid="100443511" data-redirecturi="http://www.boarsoft.com" charset="utf-8" data-callback="true"></script>
<script type="text/javascript">
QC.Login({
	btnId: "qqLoginBtn"	//插入按钮的节点id
}); 
</script>
<div id="head">
	<a href="/"><img src="/css/images/logo_s.png" alt="logo of boarsoft.com" /></a>
	<div class="title"><a href="/">boarsoft.com</a></div>
	<div class="right">
		<div>
			<a href="/public/lang.php?l=en">English</a>
			|
			<a href="/public/lang.php?l=cn">简体中文</a>
			|
			<a href="http://www.jquery.com" target="_blank">JQuery</a>
			|
			<a href="http://www.jqueryui.com" target="_blank">JQuery UI</a>
			|
			<a href="http://code.google.com/p/dynatree/" target="_blank">JQuery Dynatree Plugin</a>
			&nbsp;&nbsp;
		</div>
		<div>
			This site has JQuery, Ext/Sencha Plugins, such as: Grid Combobox Tree Tabs&nbsp;&nbsp;<br/>
			Please use IE7+, FireFox, Chrome&nbsp;&nbsp;
		</div>
		<div class="fr" style="background-color: #333; margin: 8px;">
			<span id="qqLoginBtn"></span>
		</div>
	</div>
</div>
<div class="hr"></div><div id="nav">
	<div id="nav_path">
		&nbsp;&nbsp;
		<a href="/">Home</a>
		&gt;
		<a href="/javascript">Javascript</a>
		&gt;
		<a href="/javascript/dtree">MagicDTree</a>
		&gt;
		Document	</div>
	<div id="nav_back">
		<a href="/javascript/dtree">Demo</a>
		|
		<a href="javascript:history.back()">Back</a>
		|
		<a href="/javascript">Download</a>
		&nbsp;&nbsp;
	</div>
	<div class="clear"></div>
</div>
<div id="docTabs" class="tabs"></div>
<div id="overview">
	<p>
	MagicDTree is a wrapper of Dynatree which is a JQuery tree plugin.
	MagicDTree made the Dynatree easier. You'd better learn
	<a href="http://code.google.com/p/dynatree/">Dynatree</a> plugin before start use this.
	</p>
</div>
<div id="options">
	<h3><a href="#">treeConfig</a></h3>
	<p>
		Original Dynatree config.
	</p>
	<h3><a href="#">ctxMenu</a></h3>
	<p>
		element of context menu instead of the "ctxMenu" item of Dynatree config,
		so we can extend features from this point.
	</p>
	<h3><a href="#">loader</a></h3>
	<p>
		Data provider config.
		<ul>
			<li>url: URL, data provider</li>
			<li>params: load params, eg: { pageNo: 1, pageSize: 20 }</li>
			<li>autoLoad: whether auto load data when current page ready. default = true</li>
		</ul>
	</p>
	<h3><a href="#">rootNode</a></h3>
	<p>
		root node element, readony.
	</p>
</div>
<div id="events">
	<h3><a href="#">doInsert(dt, callback)</a></h3>
	<p>
		It will be executed when user click "insert" item of context menu.
		It give us a chance to do some thing when user try to add node,
		such as open a dialog and request user input.
		It is incorrect that insert node to tree in this event.
		<ul>
			<li>dt: tree node element</li>
			<li>callback: call actual insert when it done</li>
		</ul>
	</p>
	<h3><a href="#">doUpdate(dt, callback)</a></h3>
	<p>
		It will be executed when user click "update" item of context menu.
		It give us a chance to do some thing when user try to update a node,
		such as open a dialog and request user input.
		<ul>
			<li>dt: tree node element</li>
			<li>callback: call actual update when it done</li>
		</ul>
	</p>
	<h3><a href="#">doDelete(dt, callback)</a></h3>
	<p>
		It will be executed when user click "delete" item of context menu.
		It give us a chance to do some thing when user try to delete a node,
		such as open a confirm dialog.
		<ul>
			<li>dt: tree node el</li>
			<li>callback: call actual delete when it done</li>
		</ul>
	</p>
	<h3><a href="#">onCtxMenu(el)</a></h3>
	<p>
		It will be executed when context menu popup.
		<ul>
			<li>el: tree node element which be right clicked</li>
		</ul>
	</p>
	<h3><a href="#">onLoadSubTree(dt)</a></h3>
	<p>
		It will be triggered when after load sub tree of node.
		<ul>
			<li>el: tree node element</li>
		</ul>
	</p>
	<h3><a href="#">onActive(dt)</a></h3>
	<p>
		It triggered when node be actived.
		<ul>
			<li>dt: node element</li>
		</ul>
	</p>
</div>
<div id="methods">
	<h3><a href="#">setContextMenu()</a></h3>
	<p>
		It is core of MagicDTree. No need to call it directly,
		but you can reset it if you want to custom contextMenu.
	</p>
	<h3><a href="#">addNode(dd)</a></h3>
	<p>
		Add a node to current node as child.
		Usually no need to call it directly.
		<ul>
			<li>dd: node data</li>
		</ul>
	</p>
	<h3><a href="#">updateNode(dd)</a></h3>
	<p>
		Update current node. Usually no need to call it directly.
		<ul>
			<li>dd: node data</li>
		</ul>
	</p>
	<h3><a href="#">deleteNode(key)</a></h3>
	<p>
		Delete current node. Usually no need to call it directly.
		<ul>
			<li>dd: node key</li>
		</ul>
	</p>
	<h3><a href="#">deleteChildren(dt)</a></h3>
	<p>
		Delete childern of current node.
		<ul>
			<li>dt: current node element</li>
		</ul>
	</p>
	<h3><a href="#">loadSubTree(dt)</a></h3>
	<p>
		Dynamic load sub tree of node. It will trigger onLoadSubTree events.
		<ul>
			<li>dt: current node element</li>
		</ul>
	</p>
	<h3><a href="#">getNode(key)</a></h3>
	<p>
		Get node by key.
		<ul>
			<li>key: node key</li>
		</ul>
	</p>
</div><iframe src="/javascript/related.php" class="related"></iframe>
<div class="clear" style="height: 8px;"></div>
<div style="text-align: right;">
	Copyright © 2011. All rights reserved&nbsp;&nbsp;蜀ICP备11014774号-1&nbsp;&nbsp;
	QQ: 7213571&nbsp;&nbsp;MSN: pyh_jerry@163.com&nbsp;&nbsp;E-mail: pyh_jerry@163.com&nbsp;&nbsp;
<!--
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
-->
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-24473339-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Ffc0b0282216be3d16055855d8c0e72d9' type='text/javascript'%3E%3C/script%3E"));
</script>
	&nbsp;&nbsp;
</div></body>
</html>
